console.log("background.js loaded")

document.body.innerHTML = "";

chrome.contextMenus.create({
    id: "ABC123",
    title: "测试右键菜单",
    contexts: ['page'],
}
, function (e) {//error callback
    console.log(e);
}
);
console.log(chrome.contextMenus);
chrome.contextMenus.onClicked.addListener(function (e){
    console.log(e);
});

chrome.runtime.onInstalled.addListener(function() {
    chrome.contextMenus.create({
        "id": "sampleContextMenu",
        "title": "Sample Context Menu",
        "contexts": ["selection","page"]

    });
});


